<template>
  <el-card class="avue_height">
    <search :keyName="keyName" @search="search" @resetSearch="resetSearch" ref="search" />
    <!-- <div class="content">
      <div class="table_caozuoAdd">
        <el-button type="primary" icon="plus" @click="addMendian">批量配单</el-button>
      </div>
    </div> -->
    <el-tabs v-model="keyName" type="card" @tab-click="callback">
      <!-- <el-tab-pane :label="tab.allShop" name="1">
        <allShop ref="allShop" @trigger="trigger" />
      </el-tab-pane> -->
      <el-tab-pane :label="tab.openShop" name="2">
        <openShop ref="openShop" @trigger="trigger" />
      </el-tab-pane>
      <el-tab-pane :label="tab.stopShop" name="3">
        <stopShop ref="stopShop" @trigger="trigger" />
      </el-tab-pane>
      <el-tab-pane :label="tab.end" name="4">
        <end ref="end" @trigger="trigger" />
      </el-tab-pane>
      <el-tab-pane :label="tab.close" name="5">
        <close ref="close" @trigger="trigger" />
      </el-tab-pane>
    </el-tabs>
    <el-dialog title="门店采购配单" :visible.sync="dialogVisible" width="60%">
      <el-form :model="ruleForm" ref="ruleForm" class="demo-ruleForm">
        <!-- 门店明细 -->
        <com-title
          :styleIng="{margin:'10px 0px 10px 10px'}"
          :isShow="false"
          v-if="mendianList.length > 0"
        >
          <span slot="title">
            <span>门店明细</span>
          </span>
          <div slot="table" style="padding:15px 20px">
            <el-checkbox-group v-model="mendian">
              <el-checkbox-button
                v-for="i in mendianList"
                :key="i.value"
                :label="i.value"
              >{{i.label}}</el-checkbox-button>
            </el-checkbox-group>
          </div>
        </com-title>

        <!-- 门店采购商品明细 -->
        <com-title :styleIng="{margin:'10px 0px 10px 10px'}" :isShow="false">
          <span slot="title">
            <span>门店采购商品明细</span>
            <el-button
              type="primary"
              style="margin-left:10px;position: relative;top: -3px;"
              @click="addStore"
            >创建平台采购单</el-button>
          </span>
          <buyingIfor slot="table" ref="buyingIfor" style="margin:10px 0px 10px 10px" />
        </com-title>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="handlClose">取 消</el-button>
        <el-button type="primary" @click="handlSure" :loading="loadingSure">生成采购出库单</el-button>
      </span>
    </el-dialog>
  </el-card>
</template>

<script src='./index'></script>

<style lang="scss">
.content {
  .table_caozuoAdd {
    margin: 10px 0px 20px 0px;
  }
}
</style>